home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / zip.zip / MAKEFILE < prev    next >
Text File  |  1992-09-25  |  5KB  |  162 lines

  1. # Makefile for Zip, ZipNote, ZipSplit, and Ship.
  2. # Note: this makefile leaves out the encryption/decryption part of zip, and
  3. #  completely leaves out the zipcloak program.
  4.  
  5. # what you can make ...
  6. default:
  7.     @echo ''
  8.     @echo 'Make what?  You must say what system to make Zip for--e.g.'
  9.     @echo '"make bsd".  Choices: bsd, bsdold, sysv, sun, next, next10,'
  10.     @echo 'hpux, dnix, cray, 3b1, zilog, aux, convex, aix, and minix.'
  11.     @echo '"dcosx" added by H. Wilkins.'
  12.     @echo 'See the file zip.doc for more information.'
  13.     @echo ''
  14.  
  15. # variables (to use the Gnu compiler, change cc to gcc in CC and BIND)
  16. MAKE = make
  17. CC = cc
  18. BIND = cc
  19. RENAME = mv
  20.  
  21. # flags
  22. #   CFLAGS    flags for C compile
  23. #   LFLAGS1   flags after output file spec, before obj file list
  24. #   LFLAGS2   flags after obj file list (libraries, etc)
  25. CFLAGS =
  26. LFLAGS1 =
  27. LFLAGS2 = -s
  28.  
  29. # object file lists
  30. OBJZ = zip.o zipfile.o zipup.o fileio.o util.o tempf.o shrink.o globals.o
  31. OBJI = implode.o im_lmat.o im_ctree.o im_bits.o
  32. OBJN = zipnote.o zipfile_.o zipup_.o fileio_.o globals.o
  33. OBJS = zipsplit.o zipfile_.o zipup_.o fileio_.o globals.o
  34.  
  35. # suffix rules
  36. .SUFFIXES:
  37. .SUFFIXES: _.o .o .c .doc .1
  38. .c_.o:
  39.     $(RENAME) $< $*_.c
  40.     $(CC) $(CFLAGS) -DUTIL -DEXPORT -c $*_.c
  41.     $(RENAME) $*_.c $<
  42. .c.o:
  43.     $(CC) $(CFLAGS) -DEXPORT -c $<
  44. .1.doc:
  45.     nroff -man $< | col -b > $@
  46.  
  47. # rules for zip, zipnote, zipsplit, and zip.doc.
  48. $(OBJZ): zip.h ziperr.h tempf.h tailor.h
  49. $(OBJI): implode.h crypt.h ziperr.h tempf.h tailor.h
  50. $(OBJN): zip.h ziperr.h tailor.h
  51. $(OBJS): zip.h ziperr.h tailor.h
  52. zip.o zipup.o zipnote.o zipsplit.o: revision.h
  53. zips: zip zipnote zipsplit ship
  54. zipsman: zip zipnote zipsplit ship zip.doc
  55. zip: $(OBJZ) $(OBJI)
  56.     $(BIND) -o zip $(LFLAGS1) $(OBJZ) $(OBJI) $(LFLAGS2)
  57. zipnote: $(OBJN)
  58.     $(BIND) -o zipnote $(LFLAGS1) $(OBJN) $(LFLAGS2)
  59. zipsplit: $(OBJS)
  60.     $(BIND) -o zipsplit $(LFLAGS1) $(OBJS) $(LFLAGS2)
  61. ship: ship.c
  62.     $(CC) $(CFLAGS) -o ship $(LFLAGS1) ship.c $(LFLAGS2)
  63.  
  64. # These symbols, when #defined using -D have these effects on compilation:
  65. # ZMEM        - includes C language versions of memset(), memcpy(), and
  66. #          memcmp() (util.c).
  67. # DIRENT    - use <sys/dirent.h> and getdents() instead of <sys/dir.h>
  68. #          and opendir(), etc. (fileio.c).
  69. # NODIR        - used for 3B1, which has neither getdents() nor opendir().
  70. # NDIR        - use "ndir.h" instead of <sys/dir.h> (fileio.c).
  71. # UTIL        - select routines for utilities (note and split).
  72. # PROTO        - enable function prototypes.
  73. # RMDIR        - remove directories using a system("rmdir ...") call.
  74. # CONVEX    - for Convex make target.
  75. # AIX        - for AIX make target.
  76. # EXPORT    - leave out the encryption code.
  77.  
  78. # BSD 4.3 (also Unisys 7000--AT&T System V with heavy BSD 4.2)
  79. bsd:
  80.     $(MAKE) zips CFLAGS="-O"
  81.  
  82. # BSD, but missing memset(), memcmp().
  83. bsdold:
  84.     $(MAKE) zips CFLAGS="-O -DZMEM"
  85.  
  86. # AT&T System V, Rel 3.  Also SCO, Xenix, OpenDeskTop, ETA-10P*, SGI.
  87. sysv:
  88.     $(MAKE) zips CFLAGS="-O -DDIRENT"
  89.  
  90. # DNIX 5.x: like System V but optimization is messed up.
  91. dnix:
  92.     $(MAKE) zips CFLAGS="-DDIRENT"
  93.  
  94. # Sun OS 4.x: BSD, but use getdents().
  95. sun:
  96.     $(MAKE) zips CFLAGS="-O -DDIRENT"
  97.  
  98. # NeXT 1.0: BSD, but use shared library.
  99. next10:
  100.     $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -lsys_s"
  101.  
  102. # NeXT 2.0: BSD, but use MH_OBJECT format for smaller executables.
  103. next:
  104.     $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -object"
  105.  
  106. # HPUX: System V, but use <ndir.h> and opendir(), etc.
  107. hpux:
  108.     $(MAKE) zips CFLAGS="-O -DNDIR"
  109.  
  110. # Cray Unicos 5.1.10 & 6.0.11, Standard C compiler 2.0
  111. cray:
  112.     $(MAKE) zips CFLAGS="-O -DDIRENT" CC="scc"
  113.  
  114. # AT&T 3B1: System V, but missing a few things.
  115. 3b1:
  116.     $(MAKE) zips CFLAGS="-O -DNODIR -DRMDIR"
  117.  
  118. # zilog zeus 3.21
  119. zilog:
  120.     $(MAKE) zips CFLAGS="-O -DZMEM -DNDIR -DRMDIR" CC="scc -i"
  121.  
  122. # SCO 386 cross compile for MS-DOS
  123. # Note: zip.exe should be lzexe'd on DOS to reduce its size
  124. scodos:
  125.     $(MAKE) zips CFLAGS="-O -Ms -dos -DNO_ASM" LFLAGS1="-Ms -dos" \
  126.      LFLAGS2=""
  127.     $(RENAME) zip zip.exe
  128.  
  129. # A/UX:
  130. aux:
  131.     $(MAKE) zips CFLAGS="-O -DTERMIO"
  132.  
  133. # Convex C220, OS 9.0
  134. convex:
  135.     $(MAKE) zips CFLAGS="-O2 -rl -DCONVEX"
  136.  
  137. # AIX Version 3.1 for RISC System/6000 
  138. aix:
  139.     $(MAKE) zips CC="c89" BIND="c89" \
  140.        CFLAGS="-O -D_POSIX_SOURCE -D_ALL_SOURCE -D_BSD -DAIX"
  141.  
  142. # MINIX 1.5.10 with Bruce Evans 386 patches and gcc/GNU make
  143. minix:
  144.     $(MAKE) zips CFLAGS="-O -DDIRENT -DMINIX" CC=gcc BIND=gcc
  145.     chmem =262144 zip
  146.  
  147. # Pyramid DC-OS/x 1.1-92c028 MIServer-S 10/256 r3000.
  148. dcosx:
  149.     $(MAKE) zips CFLAGS="-O -DDIRENT -DDCOSX"
  150.  
  151. # clean up after making stuff and installing it
  152. clean:
  153.     rm -f *.o
  154.     rm -f zip zipnote zipsplit ship
  155.  
  156. # This one's for my own use during development.
  157. it:
  158.     $(MAKE) zipsman CFLAGS="-O -Wall -DPROTO" LFLAGS2="-s -object"\
  159.     VPATH="${HOME}/Unix/bin"
  160.  
  161. # end of Makefile
  162.